package com.gitee.cirnochat.group.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.cirnochat.group.model.enums.GroupType;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 群聊信息
 * @TableName group
 */
@TableName(value ="group")
@Data
public class Group implements Serializable {
    /**
     * 主键ID
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 群组UUID
     */
    @TableField(value = "group_uuid")
    private String groupUuid;

    /**
     * 群主ID
     */
    @TableField(value = "owner_id")
    private Long ownerId;

    /**
     * 群名称
     */
    @TableField(value = "group_name")
    private String groupName;

    /**
     * 群头像
     */
    @TableField(value = "group_avatar")
    private String groupAvatar;

    /**
     * 群描述
     */
    @TableField(value = "group_description")
    private String groupDescription;

    /**
     * 群类型：公开/私密
     */
    @TableField(value = "group_type")
    private GroupType groupType;

    /**
     * 群通知
     */
    @TableField(value = "group_notice")
    private String groupNotice;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}